package com.wz.project.sap.STOCK_TRANSFER.service.impl;

import java.util.List;

import com.wz.project.sap.STOCK_TRANSFER.domain.ZflWmsStockTransferHeader;
import com.wz.project.sap.STOCK_TRANSFER.domain.ZflWmsStockTransferItem;
import com.wz.project.sap.STOCK_TRANSFER.domain.ZflWmsStockTransferSeri;
import com.wz.project.sap.STOCK_TRANSFER.mapper.ZflWmsStockTransferHeaderMapper;
import com.wz.project.sap.STOCK_TRANSFER.mapper.ZflWmsStockTransferItemMapper;
import com.wz.project.sap.STOCK_TRANSFER.mapper.ZflWmsStockTransferSeriMapper;
import com.wz.project.sap.STOCK_TRANSFER.service.IZflWmsStockTransferItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.wz.common.utils.text.Convert;

/**
 * 库存调拨回传Service业务层处理
 * 
 * @author wz
 * @date 2024-01-19
 */
@Service
public class ZflWmsStockTransferItemServiceImpl implements IZflWmsStockTransferItemService
{
    @Autowired
    private ZflWmsStockTransferItemMapper zflWmsStockTransferItemMapper;
    @Autowired
    private ZflWmsStockTransferHeaderMapper zflWmsStockTransferHeaderMapper;
    @Autowired
    private ZflWmsStockTransferSeriMapper zflWmsStockTransferSeriMapper;

    /**
     * 查询库存调拨回传
     * 
     * @param ZEILE 库存调拨回传ID
     * @return 库存调拨回传
     */
    @Override
    public ZflWmsStockTransferItem selectZflWmsStockTransferItemById(String ZEILE)
    {
        return zflWmsStockTransferItemMapper.selectZflWmsStockTransferItemById(ZEILE);
    }

    /**
     * 查询库存调拨回传列表
     * 
     * @param zflWmsStockTransferItem 库存调拨回传
     * @return 库存调拨回传
     */
    @Override
    public List<ZflWmsStockTransferItem> selectZflWmsStockTransferItemList(ZflWmsStockTransferItem zflWmsStockTransferItem)
    {
        return zflWmsStockTransferItemMapper.getStockTransferByItem(zflWmsStockTransferItem);
    }

    /**
     * 新增库存调拨回传
     * 
     * @param zflWmsStockTransferItem 库存调拨回传
     * @return 结果
     */
    @Override
    public int insertZflWmsStockTransferItem(ZflWmsStockTransferItem zflWmsStockTransferItem)
    {
        return zflWmsStockTransferItemMapper.insertZflWmsStockTransferItem(zflWmsStockTransferItem);
    }

    /**
     * 修改库存调拨回传
     * 
     * @param zflWmsStockTransferItem 库存调拨回传
     * @return 结果
     */
    @Override
    public int updateZflWmsStockTransferItem(ZflWmsStockTransferItem zflWmsStockTransferItem)
    {
        return zflWmsStockTransferItemMapper.updateZflWmsStockTransferItem(zflWmsStockTransferItem);
    }

    /**
     * 删除库存调拨回传对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteZflWmsStockTransferItemByIds(String ids)
    {
        return zflWmsStockTransferItemMapper.deleteZflWmsStockTransferItemByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除库存调拨回传信息
     * 
     * @param ZEILE 库存调拨回传ID
     * @return 结果
     */
    @Override
    public int deleteZflWmsStockTransferItemById(String ZEILE)
    {
        return zflWmsStockTransferItemMapper.deleteZflWmsStockTransferItemById(ZEILE);
    }

    @Override
    public int updateZflWmsStockTransferType(ZflWmsStockTransferItem zflWmsStockTransferItem) {
        zflWmsStockTransferItem.setEvType("0");
        return zflWmsStockTransferHeaderMapper.updateZflWmsStockTransferType(zflWmsStockTransferItem);
    }

    @Override
    public void insertZflWmsStockTransferHeader(ZflWmsStockTransferHeader zflWmsStockTransferHeader) {
        zflWmsStockTransferHeaderMapper.insertZflWmsStockTransferHeader(zflWmsStockTransferHeader);
    }

    @Override
    public void insertZflWmsStockTransferSeri(ZflWmsStockTransferSeri seri) {
        zflWmsStockTransferSeriMapper.insertZflWmsStockTransferSeri(seri);
    }

}
